home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / db.1.85.tar.gz / db.1.85.tar / db.1.85 / PORT / linux / OTHER_PATCHES < prev   
Text File  |  1993-11-30  |  883b  |  30 lines

  1. *** PORT/db/recno/rec_open.c.orig    1993/10/13 02:01:31
  2. --- PORT/db/recno/rec_open.c    1993/10/13 02:20:47
  3. ***************
  4. *** 159,167 ****
  5. --- 159,182 ----
  6.                   SET(t, R_EOF);
  7.               else {
  8.                   t->bt_msize = sb.st_size;
  9. + /*
  10. +  * hack : 
  11. +  *
  12. +  * The Linux kernel mmap() semantics are broken :
  13. +  * 
  14. +  * Under Linux, read only private mappings cause write only and read/write 
  15. +  * opens to fail with errno=ETXTBSY.  Shared read only mappings should work
  16. +  * fine though, but I'm not familiar enough with the code to ascertain that
  17. +  * a MAP_SHARED mapping would be safe so I use the non-mmap'd version 
  18. +  * instead.
  19. +  *
  20. +  */
  21. + #if !defined(linux) 
  22.                   if ((t->bt_smap = mmap(NULL, t->bt_msize,
  23.                       PROT_READ, MAP_PRIVATE, rfd,
  24.                       (off_t)0)) == (caddr_t)-1)
  25. + #endif
  26.                       goto slow;
  27.                   t->bt_cmap = t->bt_smap;
  28.                   t->bt_emap = t->bt_smap + sb.st_size;
  29.